#pragma once

#include <linux/cpumask_types.h>

struct root_domain
{
    atomic_t refcount;
    cpumask_var_t span;
    cpumask_var_t online;
};

/*
 * The domain tree (rq->sd) is protected by RCU's quiescent state transition.
 * See destroy_sched_domains: call_rcu for details.
 *
 * The domain tree of any CPU may only be accessed from within
 * preempt-disabled sections.
 */
#define for_each_domain(cpu, __sd) \
	for (__sd = cpu_rq(cpu)->sd; \
			__sd; __sd = __sd->parent)
